package com.example.demo.service;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.example.demo.define.UserDefine;
import com.example.demo.utils.SignVideoUtils;
import lombok.Data;
import org.springframework.beans.factory.annotation.Autowired;

import java.security.NoSuchAlgorithmException;
import java.util.Timer;
import java.util.TimerTask;

/**
 * @author xumf
 * @date 2019/12/13 14:14
 */
@Data
public class CacheManager {

    private String token;

    @Autowired
    private VideoService videoService;
    public String init() throws NoSuchAlgorithmException {
         if(token==null) {
             this.token = videoService.getToken();
         }
         return token;
    }
}
